CC       = gcc
CXX      = g++

FLAGS    = -O3

NAME     = ppr-glut

PATHINC  = -Ilcgtk/glslKernel -Ilcgtk -I.

#LIBS     = -Llcgtk/glslKernel/ -lglslKernel -lopengl32 -lglu32 -lglut32
LIBS     = -Llcgtk/glslKernel/ -lglslKernel -lglut -lGL -lGLU

OBJS     = main.o \
	tgaload.o \
	paintCursor.o \
	colorBuffer.o \
	application.o \
	camera.o \
	ellipse_rasterization.o \
	ewa_surface_splatting.o \
	jfa_splatting.o \
	main.o \
	object.o \
	ply.o \
	point_based_render.o \
	primitives.o \
	pyramid_point_render.o \
	pyramid_point_render_nearest.o \
	pyramid_point_render_color.o \
	pyramid_point_render_er.o \
	pyramid_point_render_lod.o \
	pyramid_point_render_trees.o \
	pyramid_triangle_renderer.o \
	surfels.o \
	timer.o \
	triangle_renderer.o

first: $(OBJS)
	@echo "Linking ...."
	$(CXX) -o release/$(NAME) $^ $(LIBS)
	@echo "Done !!!"

.cpp.o: $*.h
	@echo "Compiling C++ code ...."
	$(CXX) $(FLAGS) -c $*.cpp $(PATHINC)

.cc.o: $*.h
	@echo "Compiling C++ code ...."
	$(CXX) $(FLAGS) -c $*.cc $(PATHINC)

.c.o: $*.h
	@echo "Compiling C++ code ...."
	$(CC) $(FLAGS) -c $*.c $(PATHINC)

clean:
	rm -f *.o *~ .depend

all: first

#NAME     = pyramid-point-renderer-glut

#SRC      = $(OBJ:.o=.cc)

#CXXFLAGS = -O3

#INCPATH  = -Ilcgtk/glslKernel -Ilcgtk -I.

#LIBS     = -lGLU -lGL -lglut -Llcgtk/glslKernel/ -lglslKernel
#LIBS    = -lglu32 -lopengl32 -lglut32

#first: $(OBJS)
#	$(CXX) $(CXXFLAGS) $(INCPATH) -o $(NAME) $(OBJS) $(LIBS)

#clean:
#	rm -f *.o *~ .depend

#all: clean first
